// mock/detail.js
export default [
  {
    url: '/mock/api/detail/:id',
    method: 'get',
    response: ({ query, body }) => {
      console.log('query:', query);   // 获取查询参数
      console.log('body:', body);     // 获取请求体
      
      return {
        code: 200,
        data: {
          id: query.id,
          name: '商品名称',
          price: 299,
          stock: 100
        }
      };
    }
  }
];